<?php
namespace Home\Model;

use Think\Model;

class UserModel extends Model
{
    protected $tableName = 'user';
    protected $_validate = array(
        array('email', 'email', '邮箱格式不正确'),
        array('email', '', '此邮箱已注册', 0, 'unique', 1),
        array('pwd', '6,10', '密码长度在6到10位', 0, 'length', 3),
        array('repwd', 'pwd', '两次密码不一致', 1, 'confirm', 3),
    );

    protected $_auto = array(
        array('pwd', 'md5', 3, 'function'),
        array('ctime', 'time', 3, 'function'),
    );

}
